package hutool;

import cn.hutool.bloomfilter.BitMapBloomFilter;
import com.google.common.base.Charsets;
import com.google.common.hash.BloomFilter;
import com.google.common.hash.Funnel;
import lombok.extern.slf4j.Slf4j;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2021-06-07 09:55:00
 */
@Slf4j
public class LuBloomFilter {

    public void test01(){
        // 初始化
        BitMapBloomFilter filter = new BitMapBloomFilter(10);
        filter.add("123");
        filter.add("abc");
        filter.add("ddd");

        // 查找
        filter.contains("abc");


        BloomFilter<String> friends = BloomFilter.create(null, 500, 0.01);
    }

}
